package com.liangxw.site.token.controller;

import com.lxw.site.utils.JWTUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;

/**
 * @author 梁星武
 * @version 0.0.3
 * @description TokenRestController
 * @since 2021/5/15 23:33
 */
@RestController
@RequestMapping("liangxw/token")
public class TokenRestController {
//    @Autowired(required = false)
    private JWTUtil jwtUtil  = new JWTUtil();
    @GetMapping
    public String getToken(){
        System.out.println("jwtUtil。。。。。。。。。"+jwtUtil);//null
        return jwtUtil.generateJwt(new HashMap<>(),0);
    }
}
